<template>
    <div class="content1">
<!--      <news-items></news-items>-->
       <div class="message">
           <el-carousel :interval="4000">
             <el-carousel-item v-for="(blog, index) in blogs" :key="index">
               <router-link :to="`/newsDetail/${blog.id}`">
                 <img :src="blog.path" :alt="blog.title" class="carousel-image">
               </router-link>
             </el-carousel-item>
           </el-carousel>
         </div>
       </div>

<!--        &lt;!&ndash; 通知 &ndash;&gt;-->
<!--        <div class="message">-->
<!--            <h3 style="margin-left: 20px">通知</h3>-->
<!--            <hr>-->
<!--            <div v-for="(o,index) in notice" :key="index">-->
<!--                <img src="@/assets/img/arrow.gif" width="15" height="11" style="margin-bottom:3px;">-->
<!--                <el-link type="info" :underline="false" style="margin-bottom:10px;">-->
<!--                    <router-link :to="{name:'newsDetail',query:{nId:o.nId,nClass:o.nClass}}" style="text-decoration: none;color: black;font-size:12px;font-family:'黑体';">[{{o.nDate}}] {{o.nTitle}}</router-link>-->
<!--                </el-link>-->
<!--            </div>-->
<!--            <div style="position:absolute;bottom: 0">-->
<!--                <img class="click" src="@/assets/img/pic050.gif" alt="" />-->
<!--                <span><a href="/#/notice">更多...</a></span>-->
<!--            </div>-->
<!--       </div>-->

<!--        &lt;!&ndash; 重要信息 &ndash;&gt;-->
<!--       <div class="message">-->
<!--            <h3 style="margin-left: 20px">重要信息</h3>-->
<!--            <hr>-->
<!--            <div v-for="(o,index) in information " :key="index">-->
<!--                <img src="@/assets/img/arrow.gif" width="15" height="11" style="margin-bottom:3px;">-->
<!--                <el-link type="info" :underline="false" style="margin-bottom:10px;">-->
<!--                    <router-link :to="{name:'newsDetail',query:{nId:o.nId,nClass:o.nClass}}" style="text-decoration: none;color: black;font-size:12px;font-family:'黑体';">[{{o.nDate}}] {{o.nTitle}}</router-link>-->
<!--                </el-link>-->
<!--            </div>-->
<!--           <div style="position:absolute;bottom: 0">-->
<!--               <img class="click" src="@/assets/img/pic050.gif" alt="" />-->
<!--               <span><a href="/#/information">更多...</a></span>-->
<!--           </div>-->
<!--       </div>-->
<!--  </div>-->

</template>
<script>
// import NavComponent from "@/components/nav/Nav";
// import HeaderComponent from "@/components/header/Header";
// import ContentTwoConponent from "@/components/contenttwo/ContentTwo";
// import FooterConponent from "@/components/footer/Footer";
// import newsItems from "@/components/contentone/newsItems";
export default {
    name:"ContentOneComponent",
  components: {
  // newsItems
  },
    data(){
        return{
          blogs:[],
        }
    },
    methods:{
        // getAllNews(){
        //   this.$axios.get("/article/download/picList").then((res)=>{
        //     if(res.data.data.length == 0){
        //       this.List[0].nPic="https://tse1-mm.cn.bing.net/th/id/OIP-C.TqaaGAe_aQdZZxTwHNGcxgHaGs?pid=ImgDet&rs=1";
        //     } else{
        //       this.List = res.data.data;
        //       let url=this.$axios.defaults.baseURL;
        //       for (let i = 0; i < this.List.length ; i++) {
        //         this.List[i].path =url+"/tbBlog/img2/"+ this.List[i].path
        //       }
        //     }
        //   });
        // },
        getAll(){
            this.$axios.get("/tbBlog/getPaths").then((res)=>{
              this.blogs=res.data;
              console.log("res.data.data")
              console.log(res.data)
            //   if(res.data.data.length == 0){
            //   this.news[0].pic="https://tse1-mm.cn.bing.net/th/id/OIP-C.TqaaGAe_aQdZZxTwHNGcxgHaGs?pid=ImgDet&rs=1";
            // } else{
              // this.List = res.data.data;
            //   let url=this.$axios.defaults.baseURL;
            //   for (let i = 0; i < this.news.length() ; i++) {
            //     this.news[i].pic =url+"/article/article/download/"+this.news[i].pic+"?filePath=articles&fileName="+ this.news[i].pic
            //   //   console.log("pic!!")
            //   // console.log(this.news[i])
            //  // }
            // }
            });
        }
    },
    mounted() {
        this.getAll();
        // this.getAll("通知",2);
        // this.getAll("重要信息",3);
        // this.getAllNews();
    }
}
</script>
<style>
    .lunbotu2 {
      width: 300px;
      float: left;
      margin-left: 0px;
    }
    .content1{
    margin-top: 0px;
    /*height: 220px;*/
  }
  .message{
      /*width: 290px;*/
      /*height: 210px;*/
      margin: 0 15px;
      /*float: left;*/
      /*text-align: left;*/
      position:relative;
  }
  .message span{
      font-size: 12px;
  }
 .arrow{
    margin-left: 13px;
 }
 .click2 {
  margin-left: 125px;
 }
 .paw {
    font-size: 13px;
    margin-top: 2px;
 }
  .paw input{
    width: 80px;
    height: 12px;
 }
 #pwd {
  margin-left: 11px;
  padding-right: 3px;
 }


 #dl button{
  width: 40px;
  font-size: 12px;
  height: 18px;
  padding-bottom: 16px;
margin: 6px auto 0;
display: block;
 }

 .ftp{
  margin-top: 55px;
  display: flex;
  justify-content: center;
 }
    /*轮播图2*/
    /*.el-carousel__item{*/
    /*  width: 80%;*/
    /*  left: -15%;*/
    /*}*/

    .news-item{
      float: left;
      width: 340px;
      margin-left: 50px;
      height:150px
    }
    /*.el-carousel--horizontal{*/
    /*  width: 300px;*/
    /*}*/
    .el-carousel__item h3 {
      color: #475669;
      font-size: 14px;
      opacity: 0.75;
      line-height: 150px;
      margin: 0;
    }

    .el-carousel__item:nth-child(2n) {
      background-color: #99a9bf;
    }

    .el-carousel__indicator--horizontal{
      padding: 0px
    }

    .el-carousel__item:nth-child(2n+1) {
      background-color: #d3dce6;
    }
    .mainContent{
      white-space: normal;
      text-align: left;
      font-family: cursive;
    }
  .router{
    font-family: Arial,Helvetica,sans-serif;
    font-size: 1.2em;
    vertical-align: middle;
    font-weight: normal;
  }
    .carousel-image {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
</style>
